/**
 *  @file SDLApplicationSection.h
 *
 *  @date 21-nov-2009
 *  @author Ives van der Flaas
 */

#ifndef SDLAPPLICATIONSECTION_H_
#define SDLAPPLICATIONSECTION_H_

#include "applicationSection.h"
#include <SDL.h>
#include "SDLWindow.h"
#include "SDLApplication.h"
#include "buttonID.h"

namespace si_sdl
{
/**
 * An section in an SDL application
 */
class SDLApplicationSection: public si::ApplicationSection
{
public:
	SDLApplicationSection(SDLApplication& parent, SDLWindow& win);
	virtual ~SDLApplicationSection();

	/**
	 * Will be called every frame, so its objects can be updated
	 * and drawn.
	 * @param timeSinceLastFrame
	 */
	virtual void newFrame(double timeSinceLastFrame);
	/**
	 * Will be called for every SDL event that occurs
	 * @param event The event...
	 */
	virtual void onSDLEvent(SDL_Event& event);
	virtual void processButtonClick(ButtonID sender){}


protected:
	SDLApplication& fParent;
	SDLWindow& fWindow;

};

}

#endif /* SDLAPPLICATIONSECTION_H_ */
